'use strict'

var _mm = require('util/mm.js');

var _product = {
    // 获取商品列表
    getProductList : function(listParam, resolve, reject){
        console.log('getProductList');
        _mm.request({
            url     : _mm.getServerHost('/product/list.do'),
            data    : listParam,
            method  : 'post',
            success : resolve,
            error   : reject
        });
    },
    //获取商品详情 
    getProductDetail : function(productId, resolve, reject){
        console.log('getProductList');
        _mm.request({
            url     : _mm.getServerHost('/product/detail.do'),
            data    : {
                productId : productId
            },
            method  : 'post',
            success : resolve,
            error   : reject
        });
    }
};
module.exports = _product;